import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/goods/matchSave',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/goods/deleteMatchInfo?id=' + ids,
    method: 'get'
  })
}
// 任务详情
export function getMatchDetail(id) {
  return request({
    url: '/api/goods/matchInfo?id=' + id,
    method: 'get'
  })
}
// 任务状态修改
export function changeMatchStatus(id) {
  return request({
    url: 'api/goods/changeMatchStatus?id=' + id,
    method: 'get'
  })
}
export function edit(data) {
  return request({
    url: 'api/goods/matchSave',
    method: 'post',
    data
  })
}
// 任务审批
export function userMatchApprove(data) {
  return request({
    url: 'api/goods/userMatchApprove',
    method: 'post',
    data
  })
}


export default { add, edit, del,changeMatchStatus }
